package com.work.project1.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;
import java.util.Map;

@RestController
public class Template {

    @Autowired
    RestTemplate restTemplate;

    @GetMapping("/template")
    public String getTemplate()
    {

        return restTemplate.getForObject("http://localhost:8081/list", List.class).toString();
    }
}
